<?php
$domain=addslashes($_GET['domain']);
//echo $domain;exit;
$id=addslashes($_GET['id']);
$type=addslashes($_GET['type']);
if($type=='goods'){
    $url="http://".$domain."/app/index.php?act=goods&op=goods_detail&goods_id=".$id;
}
if($type=='article'){
    $url="http://".$domain."/app/index.php?act=find&op=information_particulars&article_id=".$id;
}
$level=3;
$size=3;
require_once('phpqrcode/phpqrcode.php');
$errorCorrectionLevel =intval($level) ;//容错级别
$matrixPointSize = intval($size);//生成图片大小
//生成二维码图片
$object = new QRcode();
$object->png($url, false, $errorCorrectionLevel, $matrixPointSize, 2);
?>
